package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.generateRFCPanel.generateRFCSubs.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.controller.generateRFC.CommittRFCThread;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.generateRFCPanel.GenerateRFCPanel;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.generateRFCPanel.generateRFCSubs.GenRFCFunctionPanel;

public class CommitButtonListener implements ActionListener {

	private GenRFCFunctionPanel functionPanel;
	private CommittRFCThread committRFCThread;
	private GenerateRFCPanel generateRFCPanel;
	
	public CommitButtonListener(GenerateRFCPanel generateRFCPanel, GenRFCFunctionPanel functionPanel){

		this.functionPanel = functionPanel;
		this.generateRFCPanel = generateRFCPanel;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		
		this.committRFCThread  = new CommittRFCThread(generateRFCPanel,functionPanel, this.functionPanel.getLb_progressbar());
		this.committRFCThread.start();
	}

}
